import config from "@/config"
import i18n from '@/locales'


const $t = i18n.global.t
//系统路由
const routes = [
	{
		path: "/",
		name: "Home",
		// component: () => import(/* webpackChunkName: "layout" */ '@/layout'),
		// component: () => import('@/layouts/BasicLayout.vue'),
		redirect: config.DASHBOARD_URL,
		title: "",
		meta: {
			showMenu: false, // 是否显示
			icon: ''
		}
	},
	{
		path: "/login",
		name: "login",
		title: $t('self.menu.login'),
		component: () => import('@/views/login.vue'),
		meta: {
			showMenu: false, // 是否显示
			icon: ''
		}
	},
	{
		path: "/register",
		name: "register",
		component: () => import('@/views/register.vue'),
		title: $t('self.menu.register'),
		meta: {
			showMenu: false, // 是否显示
			icon: ''
		}
	},
	{
		path: '/404',
		component: () => import(/* webpackChunkName: "fail" */ '@/views/exception/404.vue'),
		title: $t('self.menu.notFound'),
		meta: {
			showMenu: false, // 是否显示
			icon: ''
		}
	},
	// // 这个是必须配置的
	// {
	// 	path: '/:catchAll(.*)',
	// 	redirect: '/404',
	// 	title: $t('self.menu.notFound'),
	// 	meta: {
	// 		showMenu: false // 是否显示
	// 	}
	// },
]

export default routes;
